import java.util.Random;

public class array8 {
    public static void main(String[] args) {
        int[]arr=new int[10];
        Random r = new Random();
        int sum=0;
        for (int i = 0; i < arr.length; i++) {
            int x = r.nextInt(100)+1;
            arr[i]=x;
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
        for (int i = 0; i < arr.length; i++) {
            sum=sum+arr[i];
        }
        System.out.println("这些数字的和为"+sum);
        int a =sum/arr.length;
        System.out.println("这些数字的平均数为"+a);
        int count =0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]<a){
                count++;
            }
        }
        System.out.println("共有"+count+"个数比平均数小");
    }
}
